package com.foreknow.test03;

import java.util.Scanner;

public class LoopDemo2 {
    public static void main(String[] args) {
        System.out.println("*************************");
        System.out.println("1.客户信息管理");
        System.out.println("2.购物结算");
        System.out.println("3.真情回馈");
        System.out.println("4.注销");
        System.out.println("*************************");
        Scanner sc = new Scanner(System.in);
        System.out.println("请选择，输入数字：");
        boolean isRight;
        int choice = 0;
        do {
            isRight = true;
            choice = sc.nextInt();
            if (choice == 1) {
                System.out.println("执行客户信息管理");
            }else if(choice==2){
                System.out.println("购物结算");
            }else if(choice==3){
                System.out.println("真情回馈");
            }else if(choice==4){
                System.out.println("注销");
            }else{
                System.out.println("输入错误，请重新输入数字：");
                isRight = false;
            }

        }while (!isRight);
        System.out.println("程序结束....");
    }
}
